As adjacent workspaces now peek into the window picker, the first
two workspaces are already accessible without the minimap. Hide
it in that case to give more space to the window picker, and to
not clutter the overview for users who aren't using workspaces.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3739
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1696>
const Util = imports.misc.util;
const Workspace = imports.ui.workspace;
+const NUM_WORKSPACES_THRESHOLD = 2;
+
// The maximum size of a thumbnail is 5% the width and height of the screen
var MAX_THUMBNAIL_SCALE = 0.05;
_updateShouldShow() {
const { nWorkspaces } = global.workspace_manager;
- const shouldShow =
- this._settings.get_boolean('dynamic-workspaces') || nWorkspaces > 1;
+ const shouldShow = this._settings.get_boolean('dynamic-workspaces')
+ ? nWorkspaces > NUM_WORKSPACES_THRESHOLD
+ : nWorkspaces > 1;
if (this._shouldShow === shouldShow)
return;